From b045a451099570488e977c6018174d9ac4bae1d7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 3 Jul 2004 05:50:40 +0000 Subject: [PATCH] Let the cursor move to the right end of the entry text, even if it ends in Sat Jul 3 01:48:19 2004 Matthias Clasen * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move to the right end of the entry text, even if it ends in combining marks. (#141728, Theppitak Karoonboonyanan) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkentry.c | 10 +++++----- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 99d12da1f0..b3c8c6fe1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Jul 3 01:48:19 2004 Matthias Clasen + + * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move + to the right end of the entry text, even if it ends in combining + marks. (#141728, Theppitak Karoonboonyanan) + Fri Jul 2 23:34:33 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 99d12da1f0..b3c8c6fe1d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Sat Jul 3 01:48:19 2004 Matthias Clasen + + * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move + to the right end of the entry text, even if it ends in combining + marks. (#141728, Theppitak Karoonboonyanan) + Fri Jul 2 23:34:33 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 99d12da1f0..b3c8c6fe1d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Sat Jul 3 01:48:19 2004 Matthias Clasen + + * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move + to the right end of the entry text, even if it ends in combining + marks. (#141728, Theppitak Karoonboonyanan) + Fri Jul 2 23:34:33 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 99d12da1f0..b3c8c6fe1d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Sat Jul 3 01:48:19 2004 Matthias Clasen + + * gtk/gtkentry.c (gtk_entry_move_visually): Let the cursor move + to the right end of the entry text, even if it ends in combining + marks. (#141728, Theppitak Karoonboonyanan) + Fri Jul 2 23:34:33 2004 Matthias Clasen * gtk/gtkcombobox.c (gtk_combo_box_unset_model): Unset the displayed diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 1fc2848769..ff9919870a 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3226,13 +3226,13 @@ gtk_entry_move_visually (GtkEntry *entry, count++; } - if (new_index < 0 || new_index == G_MAXINT) - break; - - index = new_index; + if (new_index < 0) + index = 0; + else if (new_index != G_MAXINT) + index = new_index; while (new_trailing--) - index = g_utf8_next_char (text + new_index) - text; + index = g_utf8_next_char (text + index) - text; } return g_utf8_pointer_to_offset (text, text + index); -- 2.30.2